namespace QMVnSoft.SystemForms
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormUserRights : FormControl
    {
        private BtnControl btnCancel;
        private BtnControl btnOk;
        private BtnControl btnReset;
        private DataGridViewTextBoxColumn Column1;
        private DataGridViewCheckBoxColumn Column10;
        private DataGridViewCheckBoxColumn Column2;
        private DataGridViewCheckBoxColumn Column3;
        private DataGridViewCheckBoxColumn Column4;
        private DataGridViewCheckBoxColumn Column5;
        private DataGridViewCheckBoxColumn Column6;
        private DataGridViewCheckBoxColumn Column7;
        private DataGridViewCheckBoxColumn Column8;
        private DataGridViewCheckBoxColumn Column9;
        private IContainer components;
        private DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
        private DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2;
        private DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn3;
        private DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn6;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
        private GridControl grdInvoice;
        private GridControl grdList;
        private GridControl grdMenu;
        private GridControl grdReport;
        private GridControl grdSubsidiary;
        private object ii_UserOrder = 0;
        private string is_UserOrGroup = "U";
        private UserDataAccess oMethod = new UserDataAccess();
        private DataTable oTableA;
        private DataTable oTableL;
        private DataTable oTableM;
        private DataTable oTableR;
        private DataTable oTableU;
        private DataTable oTableV;
        private TabPage Page1;
        private TabPage Page2;
        private TabPage Page3;
        private TabPage Page4;
        private TabPage Page6;
        private TabContol tabControl;

        public FormUserRights(string ps_UserOrGroup, object pi_UserOrder)
        {
            this.InitializeComponent();
            this.grdMenu.AutoGenerateColumns = false;
            this.grdList.AutoGenerateColumns = false;
            this.grdInvoice.AutoGenerateColumns = false;
            this.grdReport.AutoGenerateColumns = false;
            this.grdSubsidiary.AutoGenerateColumns = false;
            this.UserOrGroup = ps_UserOrGroup;
            this.UserOrder = pi_UserOrder;
            this.FillData();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            this.Save();
            base.Close();
        }

        private void btnReset_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Chắc chắn muốn đặt lại quyền?", AppInstance.SoftwareName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No)
            {
                this.oMethod.ResetRights(this.UserOrGroup, this.UserOrder);
                this.FillData();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void FillData()
        {
            this.oTableM = this.oMethod.GetUserRights("M", this.UserOrder, this.UserOrGroup);
            this.grdMenu.DataSource = new BindingSource(this.oTableM, this.oTableM.TableName);
            this.oTableL = this.oMethod.GetUserRights("L", this.UserOrder, this.UserOrGroup);
            this.grdList.DataSource = new BindingSource(this.oTableL, this.oTableL.TableName);
            this.oTableV = this.oMethod.GetUserRights("V", this.UserOrder, this.UserOrGroup);
            this.grdInvoice.DataSource = new BindingSource(this.oTableV, this.oTableV.TableName);
            this.oTableR = this.oMethod.GetUserRights("R", this.UserOrder, this.UserOrGroup);
            this.grdReport.DataSource = new BindingSource(this.oTableR, this.oTableR.TableName);
            this.oTableA = this.oMethod.GetUserRights("A", this.UserOrder, this.UserOrGroup);
            this.oTableU = this.oMethod.GetUserRights("U", this.UserOrder, this.UserOrGroup);
            this.grdSubsidiary.DataSource = new BindingSource(this.oTableU, this.oTableU.TableName);
        }

        private void InitializeComponent()
        {
            this.tabControl = new TabContol();
            this.Page1 = new TabPage();
            this.grdMenu = new GridControl();
            this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
            this.dataGridViewCheckBoxColumn1 = new DataGridViewCheckBoxColumn();
            this.Page2 = new TabPage();
            this.grdList = new GridControl();
            this.Column1 = new DataGridViewTextBoxColumn();
            this.Column2 = new DataGridViewCheckBoxColumn();
            this.Column3 = new DataGridViewCheckBoxColumn();
            this.Column4 = new DataGridViewCheckBoxColumn();
            this.Column5 = new DataGridViewCheckBoxColumn();
            this.Page3 = new TabPage();
            this.grdInvoice = new GridControl();
            this.dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
            this.dataGridViewCheckBoxColumn2 = new DataGridViewCheckBoxColumn();
            this.Column6 = new DataGridViewCheckBoxColumn();
            this.Column7 = new DataGridViewCheckBoxColumn();
            this.Column8 = new DataGridViewCheckBoxColumn();
            this.Column9 = new DataGridViewCheckBoxColumn();
            this.Column10 = new DataGridViewCheckBoxColumn();
            this.Page4 = new TabPage();
            this.grdReport = new GridControl();
            this.dataGridViewTextBoxColumn3 = new DataGridViewTextBoxColumn();
            this.dataGridViewCheckBoxColumn3 = new DataGridViewCheckBoxColumn();
            this.Page6 = new TabPage();
            this.grdSubsidiary = new GridControl();
            this.dataGridViewTextBoxColumn5 = new DataGridViewTextBoxColumn();
            this.dataGridViewCheckBoxColumn6 = new DataGridViewCheckBoxColumn();
            this.btnCancel = new BtnControl();
            this.btnOk = new BtnControl();
            this.btnReset = new BtnControl();
            this.tabControl.SuspendLayout();
            this.Page1.SuspendLayout();
            ((ISupportInitialize) this.grdMenu).BeginInit();
            this.Page2.SuspendLayout();
            ((ISupportInitialize) this.grdList).BeginInit();
            this.Page3.SuspendLayout();
            ((ISupportInitialize) this.grdInvoice).BeginInit();
            this.Page4.SuspendLayout();
            ((ISupportInitialize) this.grdReport).BeginInit();
            this.Page6.SuspendLayout();
            ((ISupportInitialize) this.grdSubsidiary).BeginInit();
            base.SuspendLayout();
            this.tabControl.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.tabControl.Controls.Add(this.Page1);
            this.tabControl.Controls.Add(this.Page2);
            this.tabControl.Controls.Add(this.Page3);
            this.tabControl.Controls.Add(this.Page4);
            this.tabControl.Controls.Add(this.Page6);
            this.tabControl.Font = new Font("Arial", 8.25f);
            this.tabControl.Location = new Point(12, 12);
            this.tabControl.Name = "tabControl";
            this.tabControl.SelectedIndex = 0;
            this.tabControl.Size = new Size(770, 0x1df);
            this.tabControl.TabIndex = 0;
            this.Page1.Controls.Add(this.grdMenu);
            this.Page1.Location = new Point(4, 0x17);
            this.Page1.Name = "Page1";
            this.Page1.Padding = new Padding(3);
            this.Page1.Size = new Size(0x2fa, 0x1c4);
            this.Page1.TabIndex = 0;
            this.Page1.Text = "Truy cập menu";
            this.Page1.UseVisualStyleBackColor = true;
            this.grdMenu.AllowUserToAddRows = false;
            this.grdMenu.AllowUserToDeleteRows = false;
            this.grdMenu.AllowUserToOrderColumns = true;
            this.grdMenu.AllowUserToResizeRows = false;
            this.grdMenu.CheckColor = false;
            this.grdMenu.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdMenu.Columns.AddRange(new DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewCheckBoxColumn1 });
            this.grdMenu.Dock = DockStyle.Fill;
            this.grdMenu.Font = new Font("Arial", 8.25f);
            this.grdMenu.Location = new Point(3, 3);
            this.grdMenu.Name = "grdMenu";
            this.grdMenu.Size = new Size(0x2f4, 0x1be);
            this.grdMenu.TabIndex = 2;
            this.dataGridViewTextBoxColumn1.DataPropertyName = "Bar";
            this.dataGridViewTextBoxColumn1.FillWeight = 58.32116f;
            this.dataGridViewTextBoxColumn1.HeaderText = "Chức năng";
            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
            this.dataGridViewTextBoxColumn1.ReadOnly = true;
            this.dataGridViewTextBoxColumn1.Width = 400;
            this.dataGridViewCheckBoxColumn1.DataPropertyName = "Right_1";
            this.dataGridViewCheckBoxColumn1.FillWeight = 98.24142f;
            this.dataGridViewCheckBoxColumn1.HeaderText = "Cấm";
            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
            this.dataGridViewCheckBoxColumn1.Width = 50;
            this.Page2.Controls.Add(this.grdList);
            this.Page2.Location = new Point(4, 0x17);
            this.Page2.Name = "Page2";
            this.Page2.Padding = new Padding(3);
            this.Page2.Size = new Size(0x2fa, 0x1c4);
            this.Page2.TabIndex = 1;
            this.Page2.Text = "Cập nhật danh mục";
            this.Page2.UseVisualStyleBackColor = true;
            this.grdList.AllowUserToAddRows = false;
            this.grdList.AllowUserToDeleteRows = false;
            this.grdList.AllowUserToOrderColumns = true;
            this.grdList.AllowUserToResizeRows = false;
            this.grdList.CheckColor = false;
            this.grdList.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdList.Columns.AddRange(new DataGridViewColumn[] { this.Column1, this.Column2, this.Column3, this.Column4, this.Column5 });
            this.grdList.Dock = DockStyle.Fill;
            this.grdList.Font = new Font("Arial", 8.25f);
            this.grdList.Location = new Point(3, 3);
            this.grdList.Name = "grdList";
            this.grdList.Size = new Size(0x2f4, 0x1be);
            this.grdList.TabIndex = 1;
            this.Column1.DataPropertyName = "Ten_File";
            this.Column1.FillWeight = 58.32116f;
            this.Column1.HeaderText = "Chức năng";
            this.Column1.Name = "Column1";
            this.Column1.ReadOnly = true;
            this.Column1.Width = 400;
            this.Column2.DataPropertyName = "Right_1";
            this.Column2.FillWeight = 98.24142f;
            this.Column2.HeaderText = "Thêm";
            this.Column2.Name = "Column2";
            this.Column2.Width = 50;
            this.Column3.DataPropertyName = "Right_2";
            this.Column3.FillWeight = 83.86249f;
            this.Column3.HeaderText = "Sửa";
            this.Column3.Name = "Column3";
            this.Column3.Width = 50;
            this.Column4.DataPropertyName = "Right_3";
            this.Column4.FillWeight = 75.28648f;
            this.Column4.HeaderText = "Xóa";
            this.Column4.Name = "Column4";
            this.Column4.Width = 50;
            this.Column5.DataPropertyName = "Right_4";
            this.Column5.FillWeight = 50f;
            this.Column5.HeaderText = "Gộp mã";
            this.Column5.Name = "Column5";
            this.Column5.Width = 50;
            this.Page3.Controls.Add(this.grdInvoice);
            this.Page3.Location = new Point(4, 0x17);
            this.Page3.Name = "Page3";
            this.Page3.Padding = new Padding(3);
            this.Page3.Size = new Size(0x2fa, 0x1c4);
            this.Page3.TabIndex = 2;
            this.Page3.Text = "Cập nhật chứng từ";
            this.Page3.UseVisualStyleBackColor = true;
            this.grdInvoice.AllowUserToAddRows = false;
            this.grdInvoice.AllowUserToDeleteRows = false;
            this.grdInvoice.AllowUserToOrderColumns = true;
            this.grdInvoice.AllowUserToResizeRows = false;
            this.grdInvoice.CheckColor = false;
            this.grdInvoice.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdInvoice.Columns.AddRange(new DataGridViewColumn[] { this.dataGridViewTextBoxColumn2, this.dataGridViewCheckBoxColumn2, this.Column6, this.Column7, this.Column8, this.Column9, this.Column10 });
            this.grdInvoice.Dock = DockStyle.Fill;
            this.grdInvoice.Font = new Font("Arial", 8.25f);
            this.grdInvoice.Location = new Point(3, 3);
            this.grdInvoice.Name = "grdInvoice";
            this.grdInvoice.Size = new Size(0x2f4, 0x1be);
            this.grdInvoice.TabIndex = 3;
            this.dataGridViewTextBoxColumn2.DataPropertyName = "Ten_Ct";
            this.dataGridViewTextBoxColumn2.FillWeight = 58.32116f;
            this.dataGridViewTextBoxColumn2.HeaderText = "Chức năng";
            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
            this.dataGridViewTextBoxColumn2.ReadOnly = true;
            this.dataGridViewTextBoxColumn2.Width = 400;
            this.dataGridViewCheckBoxColumn2.DataPropertyName = "Right_1";
            this.dataGridViewCheckBoxColumn2.FillWeight = 98.24142f;
            this.dataGridViewCheckBoxColumn2.HeaderText = "Thêm";
            this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2";
            this.dataGridViewCheckBoxColumn2.Width = 50;
            this.Column6.DataPropertyName = "Right_2";
            this.Column6.HeaderText = "Sửa";
            this.Column6.Name = "Column6";
            this.Column6.Width = 50;
            this.Column7.DataPropertyName = "Right_3";
            this.Column7.HeaderText = "Xóa";
            this.Column7.Name = "Column7";
            this.Column7.Width = 50;
            this.Column8.DataPropertyName = "Right_4";
            this.Column8.HeaderText = "Xem";
            this.Column8.Name = "Column8";
            this.Column8.Width = 50;
            this.Column9.DataPropertyName = "Right_5";
            this.Column9.HeaderText = "Sổ c\x00e1i";
            this.Column9.Name = "Column9";
            this.Column9.Width = 50;
            this.Column10.DataPropertyName = "Right_6";
            this.Column10.HeaderText = "Khóa";
            this.Column10.Name = "Column10";
            this.Column10.Width = 50;
            this.Page4.Controls.Add(this.grdReport);
            this.Page4.Location = new Point(4, 0x17);
            this.Page4.Name = "Page4";
            this.Page4.Padding = new Padding(3);
            this.Page4.Size = new Size(0x2fa, 0x1c4);
            this.Page4.TabIndex = 3;
            this.Page4.Text = "Xem báo cáo";
            this.Page4.UseVisualStyleBackColor = true;
            this.grdReport.AllowUserToAddRows = false;
            this.grdReport.AllowUserToDeleteRows = false;
            this.grdReport.AllowUserToOrderColumns = true;
            this.grdReport.AllowUserToResizeRows = false;
            this.grdReport.CheckColor = false;
            this.grdReport.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdReport.Columns.AddRange(new DataGridViewColumn[] { this.dataGridViewTextBoxColumn3, this.dataGridViewCheckBoxColumn3 });
            this.grdReport.Dock = DockStyle.Fill;
            this.grdReport.Font = new Font("Arial", 8.25f);
            this.grdReport.Location = new Point(3, 3);
            this.grdReport.Name = "grdReport";
            this.grdReport.Size = new Size(0x2f4, 0x1be);
            this.grdReport.TabIndex = 2;
            this.dataGridViewTextBoxColumn3.DataPropertyName = "Bar";
            this.dataGridViewTextBoxColumn3.FillWeight = 58.32116f;
            this.dataGridViewTextBoxColumn3.HeaderText = "Chức năng";
            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
            this.dataGridViewTextBoxColumn3.ReadOnly = true;
            this.dataGridViewTextBoxColumn3.Width = 400;
            this.dataGridViewCheckBoxColumn3.DataPropertyName = "Right_1";
            this.dataGridViewCheckBoxColumn3.FillWeight = 98.24142f;
            this.dataGridViewCheckBoxColumn3.HeaderText = "Cấm";
            this.dataGridViewCheckBoxColumn3.Name = "dataGridViewCheckBoxColumn3";
            this.dataGridViewCheckBoxColumn3.Width = 50;
            this.Page6.Controls.Add(this.grdSubsidiary);
            this.Page6.Location = new Point(4, 0x17);
            this.Page6.Name = "Page6";
            this.Page6.Padding = new Padding(3);
            this.Page6.Size = new Size(0x2fa, 0x1c4);
            this.Page6.TabIndex = 5;
            this.Page6.Text = "Chọn đơn vị cơ sở";
            this.Page6.UseVisualStyleBackColor = true;
            this.grdSubsidiary.AllowUserToAddRows = false;
            this.grdSubsidiary.AllowUserToDeleteRows = false;
            this.grdSubsidiary.AllowUserToOrderColumns = true;
            this.grdSubsidiary.AllowUserToResizeRows = false;
            this.grdSubsidiary.CheckColor = false;
            this.grdSubsidiary.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdSubsidiary.Columns.AddRange(new DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewCheckBoxColumn6 });
            this.grdSubsidiary.Dock = DockStyle.Fill;
            this.grdSubsidiary.Font = new Font("Arial", 8.25f);
            this.grdSubsidiary.Location = new Point(3, 3);
            this.grdSubsidiary.Name = "grdSubsidiary";
            this.grdSubsidiary.Size = new Size(0x2f4, 0x1be);
            this.grdSubsidiary.TabIndex = 2;
            this.dataGridViewTextBoxColumn5.DataPropertyName = "Ten_Dvcs";
            this.dataGridViewTextBoxColumn5.FillWeight = 58.32116f;
            this.dataGridViewTextBoxColumn5.HeaderText = "Chức năng";
            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
            this.dataGridViewTextBoxColumn5.ReadOnly = true;
            this.dataGridViewTextBoxColumn5.Width = 400;
            this.dataGridViewCheckBoxColumn6.DataPropertyName = "Right_1";
            this.dataGridViewCheckBoxColumn6.FillWeight = 98.24142f;
            this.dataGridViewCheckBoxColumn6.HeaderText = "Cấm";
            this.dataGridViewCheckBoxColumn6.Name = "dataGridViewCheckBoxColumn6";
            this.dataGridViewCheckBoxColumn6.Width = 50;
            this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            //this.btnCancel.DialogResult = DialogResult.Cancel;
            this.btnCancel.Font = new Font("Arial", 8.25f);
            this.btnCancel.Location = new Point(700, 0x1f1);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4b, 0x17);
            this.btnCancel.TabIndex = 3;
            this.btnCancel.Text = "&Hủy bỏ";
            this.btnCancel.UseVisualStyleBackColor = true;
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnOk.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btnOk.Font = new Font("Arial", 8.25f);
            this.btnOk.Location = new Point(0x26b, 0x1f1);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new Size(0x4b, 0x17);
            this.btnOk.TabIndex = 2;
            this.btnOk.Text = "&Chấp nhận";
            this.btnOk.UseVisualStyleBackColor = true;
            this.btnOk.Click += new EventHandler(this.btnOk_Click);
            this.btnReset.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btnReset.Font = new Font("Arial", 8.25f);
            this.btnReset.Location = new Point(0x21a, 0x1f1);
            this.btnReset.Name = "btnReset";
            this.btnReset.Size = new Size(0x4b, 0x17);
            this.btnReset.TabIndex = 1;
            this.btnReset.Text = "&Reset";
            this.btnReset.UseVisualStyleBackColor = true;
            this.btnReset.Click += new EventHandler(this.btnReset_Click);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.CancelButton = this.btnCancel;
            base.ClientSize = new Size(0x31a, 0x214);
            base.Controls.Add(this.btnCancel);
            base.Controls.Add(this.btnReset);
            base.Controls.Add(this.btnOk);
            base.Controls.Add(this.tabControl);
            this.MinimumSize = new Size(0x322, 0x236);
            base.Name = "FormUserRights";
            this.Text = "Phân quyền";
            base.WindowState = FormWindowState.Maximized;
            this.tabControl.ResumeLayout(false);
            this.Page1.ResumeLayout(false);
            ((ISupportInitialize) this.grdMenu).EndInit();
            this.Page2.ResumeLayout(false);
            ((ISupportInitialize) this.grdList).EndInit();
            this.Page3.ResumeLayout(false);
            ((ISupportInitialize) this.grdInvoice).EndInit();
            this.Page4.ResumeLayout(false);
            ((ISupportInitialize) this.grdReport).EndInit();
            this.Page6.ResumeLayout(false);
            ((ISupportInitialize) this.grdSubsidiary).EndInit();
            base.ResumeLayout(false);
        }

        private void Save()
        {
            for (int i = 0; i < this.oTableM.Rows.Count; i++)
            {
                DataRow row = this.oTableM.Rows[i];
                row.EndEdit();
                if (row.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "M", row);
                }
            }
            for (int j = 0; j < this.oTableL.Rows.Count; j++)
            {
                DataRow row2 = this.oTableL.Rows[j];
                row2.EndEdit();
                if (row2.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "L", row2);
                }
            }
            for (int k = 0; k < this.oTableV.Rows.Count; k++)
            {
                DataRow row3 = this.oTableV.Rows[k];
                row3.EndEdit();
                if (row3.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "V", row3);
                }
            }
            for (int m = 0; m < this.oTableR.Rows.Count; m++)
            {
                DataRow row4 = this.oTableR.Rows[m];
                row4.EndEdit();
                if (row4.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "R", row4);
                }
            }
            for (int n = 0; n < this.oTableA.Rows.Count; n++)
            {
                DataRow row5 = this.oTableA.Rows[n];
                row5.EndEdit();
                if (row5.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "A", row5);
                }
            }
            for (int num6 = 0; num6 < this.oTableU.Rows.Count; num6++)
            {
                DataRow row6 = this.oTableU.Rows[num6];
                row6.EndEdit();
                if (row6.RowState == DataRowState.Modified)
                {
                    this.oMethod.SaveRights(this.UserOrGroup, this.UserOrder, "U", row6);
                }
            }
        }

        private object UserOrder
        {
            get
            {
                return this.ii_UserOrder;
            }
            set
            {
                this.ii_UserOrder = value;
            }
        }

        private string UserOrGroup
        {
            get
            {
                return this.is_UserOrGroup;
            }
            set
            {
                this.is_UserOrGroup = value;
            }
        }
    }
}

